setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../findNSourceUtils.R')

test.rdoc_save_model.golden <- function(H2Oserver) {
  prostate.hex = h2o.importFile(H2Oserver, path = "https://raw.github.com/0xdata/h2o/master/smalldata/logreg/prostate.csv", key = "prostate.hex")
  prostate.glm = h2o.glm(y = "CAPSULE", x = c("AGE","RACE","PSA","DCAPS"), data = prostate.hex, family = "binomial", nfolds = 10, alpha = 0.5)
  h2o.saveModel(object = prostate.glm, dir = tempdir())
  testEnd()
}

doTest("R Doc Save Model", test.rdoc_save_model.golden)

